package com.gr.catanddog_common.damin;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("passage")
@Repository
public class Content {
    @TableId("passage_id")
    String id;         //文章id
    @TableField("user_token")
    String userToken;    //用户token
    @TableField("pubData")
    String pubData;        //发布时间
    @TableField("user_name")
    String writer;          //作者
    @TableField("passage")
    String passage;         //文章内容
    @TableField("catalogue")
    String catalogue;       //归属目录
    @TableField("title")
    String title;           //标题
    @TableField("likes")
    Integer likes;          //点赞数
    @TableField("collect_number")
    Integer collectNumber;  //收藏数
    @TableField("comment_number")
    Integer commentNumber;  //评论数
    @TableField(exist = false)
    Boolean isCollect;      //是否已收藏
    @TableField(exist = false)
    Boolean isFocus;        //是否已关注
    @TableField(exist = false)
    Boolean isUpvote;       //是否已点赞
    @TableField(exist = false)
    String userImg;        //头像url
    @TableField(exist = false)
    List<String> imgurl;        //图片信息
    @TableField(exist = false)
    List<Comment>comments;  //评论

}
